#!/bin/sh
#package:odpkg
#desc:Remove a package repository
#type:local

# Copyright(c) 2011 OpenDomo Services SL. Licensed under GPL v3 or later

CONFIGFILE='/etc/opendomo/repositories.cfg'
TMPFILE='/tmp/uhltmp'

if test -z "$1"; then
	/usr/local/opendomo/addPackageRepository.sh
else
	grep -v $1 $CONFIGFILE > $TMPFILE
	cat $TMPFILE > $CONFIGFILE
	echo "# Repository deleted"
	. /usr/local/opendomo/updatePackageList.sh 
fi
